<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>栏目添加</title>
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<% include("/admin/resource/common_css.html"){} %>  
		<link rel="stylesheet" href="${ctx}/plugin/zTree/zTreeStyle.css" />
	</head>	
	<body>
		<% include("/admin/common/header.html"){} %>
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>
			<div class="main-container-inner">
			  <% include("/admin/common/menu.html",{currentstr:"系统"}){} %>
				<div class="main-content">
				 <% include("/admin/common/breadcrumb.html",{breadaddfirst:"系统管理",breadaddsecond:"栏目管理",breadaddthird:"栏目添加"}){} %>
					<div class="page-content">
			       	   <form id="myform"  method="POST"  action="save" onsubmit="return chenkeData()"> 
				       	 <table style="margin:auto; width:75%;">
							  <tr> 
								<td align="right" nowrap="nowrap">栏目名称：</td> 
							    <td width="400px">
							      <input type="text" name="chnl.name" id="name" value="${chnl.name!}"><span class="red">&nbsp;*</span>
							    </td>
							    <td align="right" nowrap="nowrap">栏目父级：</td>  
								<td width="400px;">
			                     <div class="input-group">
								  <input   type="text" id="parentName" value="${parentName!}" readonly="readonly" style="margin: 0px;width:197px;">
									<span class="input-group-addon">
									 <a href="#addModal0" data-toggle="modal" onclick="loadData('${ctx!}')">
										<i class="icon-list" title="选择父级栏目"></i>
									 </a>
									 <input type="hidden" name="chnl.parent_id" id="parentId" value="${chnl.parent_id!}"/>
									</span>
								 </div>
			                    
			                    </td> 
							</tr>
			              	<tr>
				                 <td align="right" nowrap="nowrap">主页导航是否显示：</td>
				              	 <td>
					              	 <select name="chnl.nav_is_display" id="nav_is_display">
					              	    <option value="1" <%if(chnl.nav_is_display! == 1){print("selected='selected'");}%>>是</option>
					              	    <option value="0" <%if(chnl.nav_is_display! == 0){print("selected='selected'");}%>>否</option>
					              	 </select>
					             </td>
					             <td align="right" nowrap="nowrap">是否显示：</td>
				              	 <td>
					              	 <select name="chnl.is_display" id="is_display">
					              	    <option value="1" <%if(chnl.is_display! == 1){print("selected='selected'");}%>>是</option>
					              	    <option value="0" <%if(chnl.is_display! == 0){print("selected='selected'");}%>>否</option>
					              	 </select>
					             </td>
			              	</tr> 
			              	<tr>
			              	  <td align="right" nowrap="nowrap">栏目URL：</td> 
							  <td>
							      <input type="text" id="url" name="chnl.url"  value="${chnl.url!}" />
							  </td>
			              	  <td align="right" nowrap="nowrap">排序：</td>
				              	 <td>
				              	   <input type="text" id="priority" name="chnl.priority"  value="${chnl.priority!}" /><span class="red">&nbsp;*</span>
				             </td>
				             <td></td> <td></td>
			              	</tr>
			              	<tr>
				              	 <td align="right" nowrap="nowrap">描述：</td>
				              	 <td colspan="3">
				              	   <textarea  id="description" name="chnl.description" style="width: 400px; margin: 0px 0px 9px; height: 90px;">${chnl.description!}</textarea>
				              	 </td>
				              	 <td></td> 
							     <td></td>
			              	</tr>
						 </table>
						<div class="form-actions">
						  <button class="btn btn-success" id="submit"  type="submit">保存</button>
						  <input type="hidden" name="chnl.id" value="${chnl.id!}"/>
						  <input type="hidden" name="oprtype" value="${oprtype!}"/>
					    </div>
				     </form> 
				<div id="addModal0" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"  style="width:320px;">
				  <div class="modal-header">
				    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				    <h3 id="myModalLabel"> <i class="icon-edit"></i>选择所属栏目</h3>
				  </div>
				   <div class="modal-body" style="height: 100%">
				       <ul id="tree" class="ztree" ></ul>  
				     </div>
				  <div class="modal-footer">
				     <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
				    <button  class="btn btn-success" data-dismiss="modal" aria-hidden="true">确定</button>
				  </div>
				</div>
					<!-- /.page-content -->
				</div><!-- /.main-content -->

				<% include("/admin/common/acesetting.html"){}%>
			</div><!-- /.main-container-inner -->
		</div><!-- /.main-container -->
	<% include("/admin/common/footer.html"){} %>
	<% include("/admin/resource/common_js.html"){} %>
    <script src="${ctx!}/plugin/zTree/js/jquery.ztree.core-3.5.js" type="text/javascript"></script>
    <script src="${ctx!}/plugin/zTree/js/jquery.ztree.excheck-3.5.js" type="text/javascript"></script>
    <script src="${ctx!}/plugin/zTree/js/jquery.ztree.exedit.js" type="text/javascript"></script>
    <script src="${ctx!}/js/admin/chnl.js"  type="text/javascript" charset="utf-8"> </script>
</body>
</html>
